package com.gmail.liulijuan;

public class SuanFa1 {

	public static void main(String[] args) {
		int n=11;
		int sum;
		int a;
		for (int i = 1; i <= n/2; i++) {
			sum=i;
			a=i;
			while (sum<=n) {
				if (sum==n) {
					for (int j = i; j <= a; j++) {
						System.out.printf("%6d",j);	
					}
					System.out.println(",");
					break;
				}
				a=a+1;
				sum=sum+a;
			}
		}
	}
}